/**
 * User: Anton Petrov
 * Date: 3/10/13
 * Time: 7:29 PM
 */
package com.antonpetrov.model.word
{
	import avmplus.factoryXml;

	import com.antonpetrov.controller.factory.WordsFactory;

	import org.flexunit.asserts.assertEquals;

	public class BasicWordTest
	{
		private var word:BasicWord;

		[Test]
		public function testToString():void
		{
			word = new BasicWord("foo", "bar");
			assertEquals("foo: bar", word.toString());

			word = new BasicWord("foo");
			assertEquals("foo: ((explanation missing))", word.toString());
		}

		[Test(
			description="Test an exception for an invalid BasicWord creation.",
			expects="Error")]
		public function testInvalidWordCreation():void
		{
			word = new BasicWord("");
		}
	}
}
